﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DomesticCosts.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <!--#include virtual="include/Head.ascx"-->

    <script type="text/javascript">
    function getUrlVars() {
	        var vars = {};
	        var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
	            vars[key] = value;
	        });
	        return vars;
	    }
    function doDelete(strID, strName)
    {
	    if (confirm('Bạn có thực sự muốn xóa ' + strName + '?' ))
	    {
            var vnpage= getUrlVars()['page_number'];
             var vChar= getUrlVars()['letter'];
             var strHref="";
            if(vnpage)
                strHref = "DomesticCosts.aspx?action=delete&ID=" + strID + "&page_number=" + vnpage;
            else
                strHref = "DomesticCosts.aspx?action=delete&ID=" + strID;
               
            if(vChar)
                window.location.href = strHref + "&letter=" + vChar;
            else
                window.location.href = strHref ;
        }
    }
    $().ready(function() {
        $('#txtCarr').focus().autocomplete(carrs);	
    });
	</script>
<style type="text/css">
.thheader{
font-weight:bold;vertical-align:middle;text-align:center;
font-size:11px;
border:1px solid #ccc !important;
line-height: 7px !important;;
}
</style>		    
</head>
<body>
    <div id="body-wrapper">
        <div id="header">
            <!--#include virtual="include/top.ascx"-->
        </div>
        <div id="main-content1">
            <h2>
                DỊCH VỤ NỘI ĐỊA</h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmLocalCosts" runat="server">
                <%if (nPermissions >= 3) {%>
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">
                            DỊCH VỤ NỘI ĐỊA: Add [Edit]</h3>                            
                        <div class="clear">
                        </div>
                    </div>
                    <table class="adminedit" style="width: 100%;">
                        <tr style="background: #ECECEC;">                            
                            <th align="center" rowspan="2" class="thheader">Loading Port</th>   
                            <th align="center" rowspan="2" class="thheader">Description</th>                                                                                                          
                            <th align="center" colspan="3"  class="thheader">Import</th>    
                            <th align="center" colspan="3"  class="thheader">Export</th>
                            <th align="center" rowspan="2"  class="thheader">Remark</th>                                                      
                        </tr>
                        
                        <tr style="background: #ECECEC;font-weight:bold;vertical-align:middle;text-align:center;">                                            
                            <th align="center"  class="thheader">20"</th>
                            <th align="center"  class="thheader">40"</th>                                            
                            <th align="center"  class="thheader">LCL</th>                            
                            <th align="center"  class="thheader">20"</th>                                            
                            <th align="center"  class="thheader">40"</th>
                            <th align="center"  class="thheader">LCL</th>
                        </tr>
                        
                        <tr>
                            <td >
                                <asp:TextBox class="cls" ID="txtLoadingPort" runat="server" Width="120px" TabIndex="1"></asp:TextBox>                                
                            </td>  
                            <td>
                                <asp:TextBox class="cls" ID="txtDescription" runat="server" Width="120px" TabIndex="2"></asp:TextBox>                                
                            </td>                            
                            <td>
                                <asp:TextBox class="cls" ID="txtImport20" runat="server" Width="120px" TabIndex="3" Style="text-align: right;"></asp:TextBox></td>
                            <td>
                                <asp:TextBox class="cls" ID="txtImport40" runat="server" Width="120px" TabIndex="4" Style="text-align: right;"></asp:TextBox></td>
                            <td>
                                <asp:TextBox class="cls" ID="txtImportLCL" runat="server" Width="120px" TabIndex="5" Style="text-align: right;"></asp:TextBox></td>
                            <td>
                                <asp:TextBox class="cls" ID="txtExport20" runat="server" Width="120px" TabIndex="6" Style="text-align: right;"></asp:TextBox></td>
                            <td>
                                <asp:TextBox class="cls" ID="txtExport40" runat="server" Width="120px" TabIndex="7" Style="text-align: right;"></asp:TextBox></td>                            
                            <td>
                                <asp:TextBox class="cls" ID="txtExportLCL" runat="server" Width="120px" TabIndex="8" Style="text-align: right;"></asp:TextBox></td>
                            <td>
                                <asp:TextBox class="cls" ID="txtRemark" runat="server" Width="120px" TabIndex="9" Style="text-align: right;"></asp:TextBox></td>                            
                        </tr>
                    </table>
                    <table class="paramlist admintable" width="100%">
                        <tr>
                            <td colspan="2">
                                <asp:Button class="button" ID="btnSave" runat="server" TabIndex="19" Text="Save"
                                    OnClick="btnSave_Click" /></td>
                        </tr>
                    </table>
                    <%} %>
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">
                            DỊCH VỤ NỘI ĐỊA</h3>
                            <asp:DropDownList class="cls" ID="drLoadingPort" runat="server" Width="150px" TabIndex="16"
                                AutoPostBack="True" OnSelectedIndexChanged="drLoadingPort_Selected"></asp:DropDownList>
                        <div class="clear">
                        </div>
                    </div>
                    <fieldset>
                        <asp:Repeater ID="rptData" runat="server">
                            <ItemTemplate>
                                <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                    </td>
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "LoadingPort")%>
                                </td>
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Description")%>
                                </td>
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Import20")%>
                                    </td>                                
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Import40")%>
                                    </td>                                
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "ImportLCL")%>
                                    </td>                                
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Export20")%>
                                    </td>
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Export40")%>
                                    </td>
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "ExportLCL")%>
                                    </td>                                
                                     <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Remark")%>
                                    </td>
                                     <td>
                                        <%# DataBinder.Eval(Container.DataItem, "LastUpdate")%>
                                    </td>
                                    <%if ((Session["domesticcosts"] != null) && (int.Parse(Session["domesticcosts"].ToString()) >= 3))
                                                  {%>
                                <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                    </td>
                                    <%} %>
                                </tr>
                            </ItemTemplate>
                            <HeaderTemplate>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                                    <thead>
                                        <tr>
                                            <th align="center" rowspan="2" width="30px">Index</th>
                                            <th align="center" rowspan="2">LoadingPort</th>
                                            <th align="center" rowspan="2">Description</th>
                                            <th align="center" colspan="3">Import</th>                                            
                                            <th align="center" colspan="3">Export</th>
                                            <th align="center" rowspan="2">Remark</th>                                                                                                                 
                                             <th align="center" rowspan="2">Update</th>                                           
                                            <%if ((Session["domesticcosts"] != null) && (int.Parse(Session["domesticcosts"].ToString()) >= 3))
                                              {%>
                                            <th align="center" rowspan="2" width="70px">Action</th>
                                            <%} %>
                                        </tr>
                                        <tr style="background: #CCC;">                                            
                                            <th align="center">20"</th>
                                            <th align="center">40"</th>                                            
                                            <th align="center">LCL</th>
                                            <th align="center">20"</th>                                            
                                            <th align="center">40"</th>
                                            <th align="center">LCL</th>
                                        </tr>
                                    </thead>
                            </HeaderTemplate>
                            <FooterTemplate>
                                </TABLE>
                            </FooterTemplate>
                        </asp:Repeater>
                    </fieldset>
                    <div class="clear">
                    </div>
                    <div id="footer">
                        <%=strPager%>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
